package org.trnltk.morphology.model;

public class SuffixFormApplication {
    private final SuffixForm suffixForm;
    private final String actualSuffixForm;
    private final String fittingSuffixForm;

    public SuffixFormApplication(SuffixForm suffixForm, String actualSuffixForm, String fittingSuffixForm) {
        this.suffixForm = suffixForm;
        this.actualSuffixForm = actualSuffixForm;
        this.fittingSuffixForm = fittingSuffixForm;
    }

    public SuffixForm getSuffixForm() {
        return suffixForm;
    }

    public String getActualSuffixForm() {
        return actualSuffixForm;
    }

    public String getFittingSuffixForm() {
        return fittingSuffixForm;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SuffixFormApplication that = (SuffixFormApplication) o;

        if (!actualSuffixForm.equals(that.actualSuffixForm)) return false;
        if (!fittingSuffixForm.equals(that.fittingSuffixForm)) return false;
        if (!suffixForm.equals(that.suffixForm)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = suffixForm.hashCode();
        result = 31 * result + actualSuffixForm.hashCode();
        result = 31 * result + fittingSuffixForm.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "SuffixFormApplication{" +
                "suffixForm=" + suffixForm +
                ", actualSuffixForm='" + actualSuffixForm + '\'' +
                ", fittingSuffixForm='" + fittingSuffixForm + '\'' +
                '}';
    }
}
